<link rel="stylesheet" type="text/css" href="/modules/i18n_dashboard/resources/css/i18n_dashboard.css">
<script src="/modules/i18n_dashboard/resources/js/i18n_dashboard.js"></script>
<table class="i18n-progress-table"
    data-is-translatable-xsrf-token="{{is_translatable_xsrf_token}}">
  <thead>
    <tr>
      <th>Asset</th>
      {% if main_locale %}
        <th>{{ main_locale }} (Base locale)</th>
      {% endif %}
      {% for locale in extra_locales %}
        <th>{{ locale }}</th>
      {% endfor %}
    </tr>
  </thead>
  <tbody>
    {% for row in rows %}
      <tr class="{{row.class_name}}" data-resource-key="{{row.resource_key}}">
        {% if row.spans_all_columns %}
          <td colspan="{{ num_columns }}">{{ row.name }}</td>
        {% else %}
          <td>{{ row.name }}</td>
          {% if main_locale %}
            <td>
              <label>
                <input {{ 'disabled' if is_readonly else '' }} class="is-translatable" type="checkbox" {% if row.is_translatable %}checked="checked"{% endif %}>
                Translatable
              </label>
            </td>
          {% endif %}
          {% for locale in extra_locales %}
            <td class="resource-locale-entry {{row.status_class(locale)}}">
              {% if row.view_url(locale): %}
                <a href="{{ row.view_url(locale) }}">
                  <img src="/modules/i18n_dashboard/resources/images/eye.png"></a>
              {% endif %}
              {% if not is_readonly %}
                <a href="{{ row.edit_url(locale) }}">
                  <img src="/modules/i18n_dashboard/resources/images/pencil.png"></a>
              {% endif %}
              {{ row.status(locale) }}
            </td>
          {% endfor %}
        {% endif %}
      </tr>
    {% endfor %}
  </tbody>
</table>
